<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">修改商品信息</h1>
</div>

<!--name:'',
goodstoragePrice:'',
goodsClassification:'',
tagPrice:'',
goodLabel:'',
goodMessageFile:'',
goodFabrics:'',
goodLining:'',
goodPattern:'',
goodBrands:'',
goodElasticity:'',
goodThickness:'',
goodDescription:''-->
<div class="wrapper-md">
    <form name="form" class="form-validation">
        <div class="panel panel-default">
            <div class="panel-heading">
                <span class="h4">商品信息</span>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商品名称</label>

                            <div class="col-sm-9">
                                <input type="text" class="form-control" ng-model="goods.name" required>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">入库价格</label>

                            <div class="col-sm-9">
                                <input type="number" class="form-control" placeholder="入库价格"
                                       ng-model="goods.storagePrice"
                                       ui-validate="'$value >= 5'" required>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">分类</label>

                            <div class="col-sm-9">

                                <div class="input-group m-b">
                                    <ui-select multiple ng-model="GoodsCategory.selected" theme="bootstrap"
                                               ng-disabled="disabled">
                                        <ui-select-match placeholder="选择分类">{{$item.Name}}({{$item.CategoryName}})
                                        </ui-select-match>
                                        <ui-select-choices group-by="categoryGroupBy"
                                                           repeat="CategoryItem in GoodsCategory.items|filter: $select.search">
                                            <div ng-bind-html="CategoryItem.Name | highlight: $select.search"></div>
                                        </ui-select-choices>
                                    </ui-select>
                                    <!--<input type="text" class="form-control">-->
                                        <span class="input-group-btn">
                                            <button class="btn btn-default" ng-click="addProps('classes')" type="button"><i
                                                    class="icon-pencil"></i></button>
                                        </span>
                                </div>



                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">吊牌价格</label>

                            <div class="col-sm-9">
                                <input type="number" class="form-control" placeholder="吊牌价格"
                                       ng-model="goods.tagPrice "
                                       ui-validate="'$value >= 5'" required>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">标签</label>

                            <div class="col-sm-9">
                                <div class="input-group m-b">
                                    <ui-select multiple ng-model="GoodsLabels.selected" theme="bootstrap"
                                               ng-disabled="disabled">
                                        <ui-select-match placeholder="选择标签">{{$item.Name}}
                                        </ui-select-match>
                                        <ui-select-choices
                                                repeat="label in GoodsLabels.items|filter: $select.search">
                                            <div ng-bind-html="label.Name | highlight: $select.search"></div>
                                        </ui-select-choices>
                                    </ui-select>
                                    <span class="input-group-btn">
                                                <button class="btn btn-default" ng-click="addProps('label')" type="button"><i
                                                        class="icon-pencil"></i></button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">品牌</label>

                            <div class="col-sm-9">
                                <div class="input-group m-b">
                                    <ui-select multiple ng-model="GoodsBrands.selected" theme="bootstrap"
                                               ng-disabled="disabled">
                                        <ui-select-match placeholder="选择品牌">{{$item.Name}}
                                        </ui-select-match>
                                        <ui-select-choices
                                                repeat="brand in GoodsBrands.items|filter: $select.search">
                                            <div ng-bind-html="brand.Name | highlight: $select.search"></div>
                                        </ui-select-choices>
                                    </ui-select>
                                    <span class="input-group-btn">
                                                <button class="btn btn-default" ng-click="addProps('brand')" type="button"><i
                                                        class="icon-pencil"></i></button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">上传图片</label>

                        <div class="col-sm-10">
                            <input type="file"/>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <span class="h4">面料</span>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">面料材质</label>

                                <div class="col-sm-9">
                                    <div class="input-group m-b">
                                        <ui-select multiple ng-model="GoodsFmaterials.selected" theme="bootstrap"
                                                   ng-disabled="disabled">
                                            <ui-select-match placeholder="选择材质">{{$item.Name}}
                                            </ui-select-match>
                                            <ui-select-choices
                                                    repeat="fMaterial in GoodsFmaterials.items|filter: $select.search">
                                                <div ng-bind-html="fMaterial.Name | highlight: $select.search"></div>
                                            </ui-select-choices>
                                        </ui-select>
                                    <span class="input-group-btn">
                                                <button class="btn btn-default" ng-click="addProps('fMaterial')" type="button"><i
                                                        class="icon-pencil"></i></button>
                                    </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">里料材质</label>

                                <div class="col-sm-9">
                                    <div class="input-group m-b">
                                        <ui-select multiple ng-model="GoodsImaterials.selected" theme="bootstrap"
                                                   ng-disabled="disabled">
                                            <ui-select-match placeholder="选择材质">{{$item.Name}}
                                            </ui-select-match>
                                            <ui-select-choices
                                                    repeat="iMaterial in GoodsImaterials.items|filter: $select.search">
                                                <div ng-bind-html="iMaterial.Name | highlight: $select.search"></div>
                                            </ui-select-choices>
                                        </ui-select>
                                        <span class="input-group-btn">
                                                    <button class="btn btn-default" ng-click="addProps('iMaterial')" type="button"><i
                                                            class="icon-pencil"></i></button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">图案</label>

                            <div class="col-sm-9">
                                <input type="text" class="form-control" ng-model="goods.goodPattern" required>
                            </div>
                        </div>

                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">品牌</label>
                            <div class="col-sm-9">
                                <div class="input-group m-b">
                                    <ui-select multiple ng-model="GoodsFbrands.selected" theme="bootstrap"
                                               ng-disabled="disabled">
                                        <ui-select-match placeholder="选择面料品牌">{{$item.Name}}
                                        </ui-select-match>
                                        <ui-select-choices
                                                repeat="fBrand in GoodsFbrands.items|filter: $select.search">
                                            <div ng-bind-html="fBrand.Name | highlight: $select.search"></div>
                                        </ui-select-choices>
                                    </ui-select>
                                        <span class="input-group-btn">
                                                    <button class="btn btn-default" ng-click="addProps('fBrand')" type="button"><i
                                                            class="icon-pencil"></i></button>
                                        </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">弹性</label>

                            <div class="col-sm-9">
                                <input type="text" class="form-control" ng-model="goods.goodElasticity" required>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">厚度</label>

                            <div class="col-sm-9">
                                <input type="text" class="form-control" ng-model="goods.goodThickness" required>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <span class="h4">尺码及库存</span>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">颜色</label>

                            <div class="col-sm-9">
                                <div class="input-group m-b">
                                    <ui-select multiple ng-model="GoodsColors.selected" theme="bootstrap"
                                               ng-disabled="disabled">
                                        <ui-select-match placeholder="选择颜色">{{$item.Name}}
                                        </ui-select-match>
                                        <ui-select-choices
                                                repeat="color in GoodsColors.items|filter: $select.search">
                                            <div ng-bind-html="color.Name | highlight: $select.search"></div>
                                        </ui-select-choices>
                                    </ui-select>
                                        <span class="input-group-btn">
                                                    <button class="btn btn-default" ng-click="addProps('color')" type="button"><i
                                                            class="icon-pencil"></i></button>
                                        </span>
                                </div>
                                <!--<div class="colorblock">
                                    <div class="color" style="background-color:yellow"></div>
                                    <span>黄色</span></div>
                                <div class="colorblock">
                                    <div class="color" style="background-color:green"></div>
                                    绿色
                                </div>
                                <div class="colorblock">
                                    <div class="color" style="background-color:red"></div>
                                    红色
                                </div>
                                <div class="colorblock">
                                    <div class="color" style="background-color:purple"></div>
                                    紫色
                                </div>-->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">尺码</label>

                            <div class="col-sm-9">
                                <label class="i-checks">
                                    <input type="checkbox" ng-model="sizeItems.XL"><i></i> XL
                                </label>
                                <label class="i-checks">
                                    <input type="checkbox"  ng-model="sizeItems.XXL"><i></i> XXL
                                </label>
                                <label class="i-checks">
                                    <input type="checkbox" ng-model="sizeItems.LL"><i></i> LL
                                </label>
                                <label class="i-checks">
                                    <input type="checkbox" ng-model="sizeItems.XSL"><i></i> XSL
                                </label>
                                <label class="i-checks">
                                    <input type="checkbox" ng-model="sizeItems.XS"><i></i>XS
                                </label>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">库存</label>

                            <div class="col-sm-9 stock-box">
                                <div class="header col-md-10">
                                    <div class="col-md-2">颜色</div>
                                    <div class="col-md-2">尺码</div>
                                    <div class="col-md-4">库存数量</div>
                                    <div class="col-md-4">上传搭配图</div>
                                </div>
                                <div class="message-body col-md-10">
                                    <div class="col-md-12" ng-repeat="p in GoodsColors.selected">
                                        <div class="color col-md-2">{{p.Name}}</div>
                                        <div class="sizeMessage col-md-6">
                                            <div class="col-md-12" ng-show="sizeItems.XL">
                                                <div class="size col-md-4">
                                                    XL
                                                </div>
                                                <div class="number col-md-8">
                                                    <input type="number">
                                                </div>
                                            </div>
                                            <div class="col-md-12" ng-show="sizeItems.XXL">
                                                <div class="size col-md-4">
                                                    XXL
                                                </div>
                                                <div class="number col-md-8">
                                                    <input type="number">
                                                </div>
                                            </div>
                                            <div class="col-md-12" ng-show="sizeItems.LL">
                                                <div class="size col-md-4">
                                                    LL
                                                </div>
                                                <div class="number col-md-8">
                                                    <input type="number">
                                                </div>
                                            </div>
                                            <div class="col-md-12" ng-show="sizeItems.XSL">
                                                <div class="size col-md-4">
                                                    XSL
                                                </div>
                                                <div class="number col-md-8">
                                                    <input type="number">
                                                </div>
                                            </div>
                                            <div class="col-md-12" ng-show="sizeItems.XS">
                                                <div class="size col-md-4">
                                                    XS
                                                </div>
                                                <div class="number col-md-8">
                                                    <input type="number">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="upload-box col-md-4">
                                            <input type="file"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">尺码图片</label>

                            <div class="col-sm-9">
                                <input type="file"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <span class="h4">详情描述</span>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">详情描述</label>

                            <div class="col-sm-9">
                                <div lazy-load="textAngular">
                                    <div text-angular ng-model="goods.goodDescription" class="btn-groups"></div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>

            </div>
        </div>
        <footer class="panel-footer text-right bg-light lter">
            <button type="submit" class="btn btn-success" ng-click="saveNewGood()">保存</button>
        </footer>
    </form>
</div>
<!-- modal -->
<div ng-controller="ModalDemoCtrl" class="panel b-a">
    <script type="text/ng-template" id="myModalContent.html">
        <div ng-include="'tpl/goods/add_brand.html'"></div>
    </script>
    <script type="text/ng-template" id="addProps.html">
        <div ng-include="'tpl/goods/addProps.html'"></div>
    </script>

    <div class="panel-heading b-b b-light">Modal</div>
    <div class="panel-body">
        <button class="btn btn-success" ng-click="open()">Open me!</button>
        <button class="btn btn-default" ng-click="open('lg')">Large modal</button>
        <button class="btn btn-default" ng-click="open('sm')">Small modal</button>
    </div>
</div>
<!-- /modal -->